<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style/css/common.css" type="text/css" />
<LINK href="style/css/ui-lightness/jquery-ui-1.8.8.custom.css" type=text/css rel=stylesheet>
<title>管理区域</title>

<SCRIPT src="style/js/jquery-1.4.2.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/jquery-ui-1.8.6.custom.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckfinder/ckfinder.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckeditor.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/main.js" type=text/javascript></SCRIPT>

<link href="style/js/Pager.css" rel="stylesheet" type="text/css" />
<script src="style/js/jquery.pager.js" type="text/javascript"></script>
<script src="style/js/jquery.simpletip-1.3.1.pack.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
	$(".editlink").click(function(){
		//var linkurl = $(this).column("href");
		
		//window.open(linkurl, "a", "toolbar=no,location=no,directories=no,menubar=no,scrollbars=1,resizable=1,status=no,top=0,left=0");
		//newW.location = ;
		//return false;
	});
	//$(".articleSet").simpletip({content:'点击以设置/取消属性',fixed:false,});
	//$(".article").simpletip({content:'点击打开快速编辑框',fixed:false,});
	$(".cbg").hover(function(){$(this).css("background-color","#F3F8F7")},function(){$(this).css("background-color","")});	
});
wid="<%$column.wid%>";
classid="<%$column.classid%>";
</script>
</head>

<body>
<div id="man_zone">
  <div id="tabs">
	<ul>
		<li><a href="#tabs-1">列表</a></li>
		<li><a href="#tabs-2">栏目属性</a></li>
	</ul>
 <div id="tabs-1" style="padding-left:0.2em;padding-right:0.4em;">
 <div style="clear:both;">
 <span style="padding-left:5px;float:left; color:green;" class="button">
 栏目名:<%$column.classname%>
 </span>
 <span style="padding-left:5px;float:left" class="button">
 <a href="index.php?m=website&a=attribute&wid=<%$column.wid%>"  target="mainFrame">网站属性</a>
 </span>
 <span style="padding-left:5px;float:left">
 <%assign var=modid value=$column.modid%>
 <a href="index.php?m=<%$mode.$modid.tbname%>&a=add&classid=<%$column.classid%>&wid=<%$column.wid%>" class="button">增加信息</a>
 </span>
   
  <span style="padding-left:5px;float:left">
  <a href="index.php?m=system&a=preview&wid=<%$column.wid%>&action=index" class="button" target="_blank">预览首页</a> <a href="index.php?m=system&a=preview&classid=<%$column.classid%>&wid=<%$column.wid%>&action=column" target="_blank" class="button">预览栏目</a></span>
  <span style="padding-left:50px;float:left">
  <select name="" id="make">
  	<option value="index.php?m=system&a=make&wid=<%$column.wid%>&action=index">生成首页</option>
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=<%$column.classid%>&action=column">生成当前栏目页</option>
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=wid&action=column">生成所有栏目页</option>
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=<%$column.classid%>&action=page&id=classid">生成当前栏目所有文章</option>
    
    
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=<%$column.classid%>&action=index,column">生成首页和当前栏目页</option>
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=wid&action=index,column">生成首页和所有栏目页</option>
    
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&classid=<%$column.classid%>&action=page,column&id=classid">生成当前栏目和所有文章</option>
    <option value="index.php?m=system&a=make&wid=<%$column.wid%>&action=index,page,column&classid=wid&id=wid">全站生成</option>
  </select>
  <input name="" type="button" value="生成"  class="make" onclick='window.open(document.getElementById("make").value, "win");' />
 </span>
  <span style="padding-left:50px;float:left">
  <form action="" method="get">
  <input name="value" type="text" class="size" value="<%$value%>" />
   <select name="field">
  	<option value="title"<%if $field eq 'title'%> selected="selected"<%/if%>>标题</option>
    <option value="aid"<%if $field eq 'aid'%> selected="selected"<%/if%>>ID</option>
    <option value="content"<%if $field eq 'content'%> selected="selected"<%/if%>>内容</option>
    <option value="writer"<%if $field eq 'writer'%> selected="selected"<%/if%>>作者</option>
  </select>
  <input type="hidden" name="classid" value="<%$column.classid%>" />
  <input type="hidden" name="order" value="<%$order%>" />
  <input type="hidden" name="m" value="column" />
  <input name="" type="submit" value="搜索" />
  </form>
 </span>
 <span style="padding-left:50px;float:left">
 <form action="" method="get" style="">
   <select name="order">
  	<option value="aid asc"<%if $order eq 'aid asc'%> selected="selected"<%/if%>>按ID顺序排列</option>
    <option value="aid desc"<%if $order eq 'aid desc'%> selected="selected"<%/if%>>按ID倒序排列</option>
    <option value="posttime asc"<%if $order eq 'posttime asc'%> selected="selected"<%/if%>>按日期顺序排列</option>
    <option value="posttime desc"<%if $order eq 'posttime desc'%> selected="selected"<%/if%>>按日期倒序排列</option>
  </select>
  <input type="hidden" name="classid" value="<%$column.classid%>" />
  <input type="hidden" name="field" value="<%$field%>" />
  <input type="hidden" name="value" value="<%$value%>" />
  <input type="hidden" name="m" value="column" />
  <input name="" type="submit" value="排序" />
  </form>
 </span>
  <span style="float:right; padding-right:15px;">
  <a href="index.php?m=<%$mode.$modid.tbname%>&a=unaudit&&wid=<%$column.wid%>" style="color:red">待审核信息</a>
  </span>
 </div>
 <div style="clear:both;">
 	<%assign var=mid value=$column.modid%>
    <%assign var=tbname value=$mode.$mid.tbname%>
    <%include file="`$tbname`_list.php"%>
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td align="center"></td>
        <td colspan="7" align="right">
        	<label><input name="" type="checkbox" value="" id="checkAll" />全选/反选</label>
            <input name="" type="button" value="生成" id="makePage" wid="<%$column.wid%>" classid="<%$column.classid%>" onclick="window.location.href='index.php?m=system&a=make&action=page&wid=<%$column.wid%>&classid=<%$column.classid%>&id='+getCheckBox()" />
        	<input name="" type="button" value="审核"  class="ajaxBox" onclick=$(this).attr("href","index.php?m=<%$tbname%>&a=set&wid=<%$column.wid%>&classid=<%$column.classid%>&field=html&value=1&id="+getCheckBox()); />
            <input name="" type="button" value="删除" class="delete" onclick=$(this).attr("href","index.php?m=<%$mode.$modid.tbname%>&a=delete&ajax=1&id="+getCheckBox()); />
            <input name="" type="button" value="移动" />
            <input name="" type="button" value="复制" />
        </td>
        </tr>
        <tr>
        <td align="center">
			<span>总共:<%$num%>条信息</span>
        </td>
        <td colspan="7" align="left" id="pager">
        
        </td>
        </tr>
    </table>
 </div>
 </div>
 <div id="tabs-2" style="padding-left:0.2em;padding-right:0.4em;">
 <form method="post" action="index.php?m=column&a=edit">
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td>栏目名称</td>
        <td><input type="text" name="classname" id="classname" value="<%$column.classname%>" /></td>
      </tr>
      <tr>
        <td>栏目别名</td>
        <td><input type="text" name="bname" id="bname" value="<%$column.bname%>" /></td>
      </tr>
      <tr>
        <td>所属栏目</td>
        <td>
        	<select name="bclassid">
            	<option value="0">顶级栏目</option>
                <%foreach item=val from=$columns%>
                <option value="<%$val.classid%>" <%if $val.classid eq $column.bclassid%>selected=selected<%/if%>><%$val.classname%></option>
                <%/foreach%>
            </select>
        </td>
      </tr>
      <tr>
        <td>栏目类型</td>
        <td><%if $column.classtype eq 'n'%>内部栏目<%else%>外部栏目<%/if%></td>
      </tr>
      <!--
      <tr>
        <td>是否终级栏目</td>
        <td>
        <select name="islast">
          <option value="1"<%if $column.islast%>selected="selected" <%/if%>>是</option>
          <option value="0"<%if !$column.islast%>selected="selected" <%/if%>>否</option>
        </select></td>
      </tr>
      -->
      <tr>
        <td>隐藏栏目</td>
        <td>
        <select name="display">
          <option value="0"<%if !$column.display%>selected="selected" <%/if%>>是</option>
          <option value="1"<%if $column.display%>selected="selected" <%/if%>>否</option>
        </select></td>
      </tr>
      <tr>
        <td>栏目存放文件夹</td>
        <td><input type="text" name="classpath" id="classpath" value="<%$column.classpath%>" />（相对于网站HTML默认保存路径）</td>
      </tr>
      <tr>
        <td>系统模型</td>
        <td>
        <select name="modid">
        <%foreach item=val from=$mode%>
        <option value="<%$val.mid%>"<%if $val.mid eq $column.modid%> selected="selected"<%/if%>><%$val.mname%></option>
        <%/foreach%>
        </select>
        </td>
      </tr>
      <tr>
        <td>绑定域名</td>
        <td><input type="text" name="domain" id="domain" value="<%$column.domain%>" /></td>
      </tr>
      <tr>
        <td>栏目缩略图</td>
        <td><input type="text" name="classimg" id="classimg" value="<%$column.classimg%>" /></td>
      </tr>
      <tr>
        <td>SEO标题</td>
        <td><input type="text" name="classtitle" id="classtitle" value="<%$column.classtitle%>" /></td>
      </tr>
      <tr>
        <td>页面关键字</td>
        <td><input type="text" name="classkeyword" id="classkeyword" value="<%$column.classkeyword%>" /></td>
      </tr>
      <tr>
        <td>栏目简介</td>
        <td><textarea name="intro" cols="intro" rows="4" style="width:500px;"><%$column.intro%></textarea></td>
      </tr>
      <tr>
        <td>
          列表模板
       </td>
        <td><input type="text" name="listtemp" id="listtemp" value="<%$column.listtemp%>" /></td>
      </tr>
      <tr>
        <td>内容模板</td>
        <td><input type="text" name="contenttemp" id="contenttemp" value="<%$column.contenttemp%>" /></td>
      </tr>
      <tr>
        <td>栏目首页默认文件名</td>
        <td><input type="text" name="defaultname" id="defaultname" value="<%$column.defaultname|default:"index.html"%>" /></td>
      </tr>
      <tr>
        <td>栏目命名规则</td>
        <td><input type="text" name="classextension" id="classextension" value="<%$column.classextension%>" /></td>
      </tr>
      <tr>
        <td>内容页命名规则</td>
        <td><input type="text" name="contentextension" id="contentextension" value="<%$column.contentextension%>" /></td>
      </tr>
      <tr>
        <td>
          内容
       </td>
        <td><textarea name="content" cols="8" rows="6" style="width:500px;"><%$column.content%></textarea></td>
      </tr>
      <tr>
        <td>
          <input type="hidden" name="classid" id="classid" value="<%$column.classid%>" />
          <input type="submit" name="" id="submit" value="提交" />
       </td>
        <td>&nbsp;</td>
      </tr>
    </table>
     </form>
 </div>
 </div>
</div>

<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'content' );
//]]>
CKFinder.SetupCKEditor(CKEDITOR, 'style/js/ckeditor/ckfinder/');
PageClick = function(pageclickednumber) {
	window.location = window.location.toString()+'&page='+pageclickednumber;
}
$("#pager").pager({ pagenumber: <%$page%>, pagecount: <%$pagecount%>, buttonClickCallback: PageClick });   
</script>
<div id="articleBox" style="display:none;">
</div>
</body>
</html>
